#pragma once
#include "controlex\FormViewUI.h"
#include "TicketCore.h"

class CSubmitOrderThread;
class CMainDlg;

class CMainView :
	public CFormViewUI
{
public:
	CMainView(CMainDlg*	pParentDlg);
	~CMainView(void);
	virtual void InitFormView();
 //   virtual void CreateWnd(HWND parentWnd, const RECT & rect, 
	//	LPCTSTR  strText = _T(""), const Color & textColor = Color(254, 103, 103, 103));
	//CViewContainer * GetViewContainner(const wstring & strViewName);
//private:
//	CViewContainer *   m_pViewContainer;

	int GetSecTimespan();
	//void ShowLog(const wstring& strLog);

	void onClickLogin12306();
	void onClickTicketSetting();
	void onClickStartBuyTicket();
	void onClickQA();
	void onClickCancel();
	void onClickLogout();
	void onStopBuyTicket();
	void onCheckUpdate();

	void OnDoBuyTicketTimer();
	void OnSubmitOrderOK();
	void OnNewMessageLog();
protected:
	CSubmitOrderThread	*	m_pThreadSubmitOrder;
	CMainDlg*				m_pParentDlg;
};
